﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar.Controls;
using PlanningGIS.Util.Data;

namespace PlanningGIS.Win.Controls
{
    /// <summary>
    /// 数据库连接控件
    /// </summary>
    public partial class DataConnect : UserControl
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public DataConnect()
        {
            InitializeComponent();
        }
        
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DataConnect_Load(object sender, EventArgs e)
        {

        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Radio_CheckedChanged(object sender, EventArgs e)
        {
            //CheckBoxX chk = (CheckBoxX)sender;
            //if (!chk.Checked) return;
            //switch (chk.Text)
            //{
            //    case "Sql":
            //    case "MySql":
            //    case "Oracle":
            //        tbctl.SelectedTab = tbitmDb;
            //        break;
            //    case "Access":
            //    case "Sqlite":
            //    case "个人数据库":
            //        tbctl.SelectedTab = tbitmLocal;
            //        break;
            //}
        }

        /// <summary>
        /// 
        /// </summary>
        public DbConnectionInfo Connection
        {
            get
            {
                return new DbConnectionInfo()
                {
                    Server = txtServer.Text,
                    UserID = "",
                    SID = txtDb.Text,
                    DBType = "",
                                      
                    Password = ""
                };
            }
        }

    }
}
